# example8_1.py
# coding=utf-8
import pandas as pd

# 设置DataFrame以右对齐方式打印输出
pd.set_option('display.unicode.east_asian_width', True)

df = pd.read_csv("./data/winequality-red.csv",sep=";")
print("原始数据前3行、后5列：\n",df.iloc[:3, -5:], sep="")
print("原始数据形状：",df.shape)
X = df.drop("quality",axis=1)  
print("特征部分前3行、后5列：\n",X.iloc[:3, -5:], sep="")
print("特征数据形状：",X.shape)
y = df["quality"]    # 分离出标签（目标、输出）数据
print("目标数据前3行：\n",y[:3], sep="")
print("目标数据形状：",y.shape)

